[MIRROR] Interaction System Update #1989
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original PR: NovaSector/NovaSector#863
About The Pull Request
This PR includes a modest refactor, bugfix, and feature update to the interaction system.
If you are merging this PR on a downstream repository, please feel free to download the updated JSON files:
Download updated-interactions.zip from Google Drive
Granular list of changes:
Fixed a bug which was causing self-interactions to be usable on people other than yourself.
Fixed a severe bug which was causing the interaction menu to call
sleep
and block processing of DCS signals:open_interaction_menu
DCS signal handler. I fixed the issue by usingINVOKE_ASYNC
on the offending function calls.(Sleeping/Blocking calls made from within DCS signal handlers are not allowed. Critical warnings are thrown in logs.)
SIGNAL_HANDFLER
header. Such a header is literally only composed ofSHOULD_NOT_SLEEP(TRUE)
which immediately throws warnings due to the blocking calls to TGUI which take place in the interaction menu.act
proc blocks via calling TGUI as well, so I moved the offending code to an asynchronousapply_effects
proc.Fixed the
sound_possible
andsound_use
parameters, which were non-functional due to developer error:SEND_SOUND
was being called in a for-loop with erroneous input operands.SEND_SOUND
, interactions were not using thesound_range
parameter when they were expected to.playsound
.sound_vary
, an input operand toplaysound
to randomly change pitch.Added a new pronoun template system to interactions using
replacetext
:message
,target_messages
, anduser_messages
.%TARGET_PRONOUN_THEIR%
%TARGET_PRONOUN_THEM%
%TARGET_PRONOUN_THEY%
%USER_PRONOUN_THEIR%
%USER_PRONOUN_THEM%
%USER_PRONOUN_THEY%
How This Contributes To The Nova Sector Roleplay Experience
This PR helps to make interactions a bit more personable by including the expected gender pronouns in interactions messages. Additionally, I identified and repaired minor and severe bugs. I fixed a minor bug which was preventing interaction sounds from working as expected, and a severe bug which was causing the DCS to sleep/block execution when it isn't expected.
While not included in this PR, I have also updated all of the interaction JSON files with pronoun tags and sound effects; the updated JSON files will be transmitted to the head maintainer for later addition.
Proof of Testing
I've been testing the updated code in an invite-only server for some time. I have also tested on the most recent Nova Sector build.
Screenshots/Videos
Changelog
🆑 A.C.M.O.
fix: Fixed a bug which was causing signal handling to briefly freeze upon opening and using the interaction menu.
fix: Fixed a bug which was preventing playing sounds from interactions.
fix: Fixed a bug which was causing self-interactions to be usable on people other than yourself.
refactor: Added a template system to interactions to enable expected gender pronoun usage.
/:cl: